<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>
</head>

<body>
    <input type="checkbox" id="ck" />
    <hr />
    <div id="div">
        <input type="checkbox" /><br />
        <input type="checkbox" /><br />
        <input type="checkbox" /><br />
        <input type="checkbox" /><br />
        <input type="checkbox" />
    </div>
    <script>
        document.getElementById("ck").onclick = function () {
            let objDiv = document.getElementById("div");
            let arrTnput = objDiv.children;
            for (let i = 0; i < arrTnput.length; i++) {
                let objInput = arrTnput[i];
                objInput.checked = this.checked;
            }

        }




    </script>


</body>

</html>